Skip to content

Respect the provider OAuth refresh window before review - #26

Merged
AppSolves merged 1 commit into
mainfrom
fix/respect-provider-refresh-window
Nov 15, 2026
Merged

AppSolves merged 1 commit into
mainfrom
fix/respect-provider-refresh-window

Conversation

@AppSolves

Copy link
Copy Markdown
Owner

The trusted runner refreshes whenever an OAuth token has less than 25 minutes remaining, but the provider can forbid renewal until a later earliest_refresh_at. Live acceptance reached the credential stage before that timestamp, and OAuth.refresh intentionally rejects premature calls. The unclassified failure recorded a safe COMMENT and correctly failed the review job.

Wait until the provider’s eligibility timestamp under the existing exclusive session lease, bounded to the 25-minute renewal window. Only then perform the existing official refresh and durably CAS-persist rotation before inference. Do not reconnect, copy tokens, bypass expiry, change endpoints or fall back to paid API billing. Increase the review job cap from 35 to 50 minutes to include that provider-mandated wait and bounded inference; no new permissions or credential access.

Validation: full Node 24 check (196 tests), virtual-clock proof of no early continuation, immediate eligible continuation and bounded/invalid timestamps; workflow budget assertion. Full CI includes actual Codex/Docker isolation. Runner/workflow change requires coordinated pins to this PR’s actual merge SHA before rollout. Global merging and deferred website flags remain disabled.

@AppSolves
AppSolves merged commit 29c6254 into main Nov 15, 2026
4 checks passed
@AppSolves
AppSolves deleted the fix/respect-provider-refresh-window branch November 15, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant